﻿@model TaskRecord.Web.Views.Home.TaskViewModel

@{
    ViewBag.Title = "Home Page";
}
<div ng-controller="taskRecordController">
    <span us-spinner ng-show="saving"></span>
    <div class="row page-title">
        <div class="col-sm-2 col-sm-offset-3" style="padding: 0">
            <input class="form-control" type="text" datepicker-popup="yyyy/MM/dd" ng-model="taskRecordsResource.queryDate"
                   is-open="opened" min-date="minDate" max-date="maxDate" datepicker-options="dateOptions"
                   ng-required="true" close-text="Close" ng-change="query()"/>
        </div>
        <button style="display: inline-block" type="button" class="btn btn-default" ng-click="open($event)"><i class="glyphicon glyphicon-calendar"></i></button>
        <span>电力维修大队工作任务记录</span>

    </div>
    <hr />
    <div class="row">
        <div class="col-md-6">
            <task-record-add saving="saving" can-edit="canEdit" task-records="taskRecordsResource.teamOneTaskRecords" new-task-record="taskRecordsResource.teamOneNewTaskRecord" task-records-resource="taskRecordsResource"></task-record-add>
        </div>
        <div class="col-md-6">
            <task-record-add saving="saving" can-edit="canEdit" task-records="taskRecordsResource.teamTwoTaskRecords" new-task-record="taskRecordsResource.teamTwoNewTaskRecord" task-records-resource="taskRecordsResource"></task-record-add>
        </div>
    </div>
    <div class="row">
        <div class="col-md-6">
            <task-record-add saving="saving" can-edit="canEdit" task-records="taskRecordsResource.teamThreeTaskRecords" new-task-record="taskRecordsResource.teamThreeNewTaskRecord" task-records-resource="taskRecordsResource"></task-record-add>
        </div>
        <div class="col-md-6">
            <task-record-add saving="saving" can-edit="canEdit" task-records="taskRecordsResource.teamFourTaskRecords" new-task-record="taskRecordsResource.teamFourNewTaskRecord" task-records-resource="taskRecordsResource"></task-record-add>
        </div>
    </div>
    <div class="row">
        <div class="col-md-6">
            <team-record-add saving="saving" can-edit="canEdit" task-records-resource="taskRecordsResource" team-record="taskRecordsResource.teamRecordViewModel"></team-record-add>
        </div>
        <div class="col-md-6">
            <note-record-add saving="saving" can-edit="canEdit" task-records-resource="taskRecordsResource" note-records="taskRecordsResource.notes" new-note-record="taskRecordsResource.newNoteRecord"></note-record-add>
        </div>
    </div>
</div>


<style>
    .page-title {
        font-size: 20px;
        margin: 10px;
    }

    .table th {
        text-align: center;
    }

    .table select {
        padding: 0;
        font-size: 12px;
    }
</style>